package vn.ikame.android.chuyenay;

import vn.ikame.android.object.Var;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.Menu;

public class Splash extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
        
        Var.tf = Typeface.createFromAsset(Splash.this.getBaseContext().getAssets(), "fonts/SEGOEUI.TTF");
        
        Thread splashTread = new Thread() {
			@Override
			public void run() {
				try {
					Thread.sleep(2000);
				} catch (InterruptedException e) {
					// do nothing
				} finally {
					startActivity(new Intent(Splash.this, QuestionList.class));
					Splash.this.finish();
				}
			}
		};
		splashTread.start();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.splash, menu);
        return true;
    }
}
